<?php if(!isset($pid)){$pid = -1;}?>
<?php if(!isset($type)){$type = '';}?>
<?php if(!isset($title)){$title = '';}?>
<?php if(!isset($tags)){$tags = array();}?>
<?php if(!isset($content)){$content = '';}?>
<?php if(!isset($num_likes)){$num_likes = 0;}?>
<?php if(!isset($author)){$author =array();}?>
<?php if(!isset($posttime)){$posttime ='';}?>

<?php if ($type == 'text'):?>
	<?php if ($title):?>
		<h4><?php echo $title?></h4>
	<?php endif;?>
	<p><?php echo $content?></p>
<?php elseif ($type == 'picture'):?>
	<center>
		<a href = '/MyMicroBlog/public/image/feed/<?php echo$content?>' 
			<?php if ($title=='')$title='No description.';?>
			target = '_blank' class = 'img-feed-view' data-content = '<?php echo $title?>'>
			<img src = '/MyMicroBlog/public/image/feed/<?php echo$content?>' 
				style = 'height:300px'></img>
		</a>
	</center>
<?php elseif ($type == 'link'):?>
	<h4><?php echo $content?></h4>
	<p style = 'color:#999;'><i><?php echo $title?></i></p>
<?php elseif ($type == 'music'):?>
<?php elseif ($type == 'vedio'):?>
<?php elseif ($type == 'share'):?>
	<?php if($orig['type']!='delete'):?>
	<h5>Share from <a href="<?php echo base_url('index.php/blog/index').'/'.$orig['bid']?>">
		<?php echo $orig['blog_name']?></a></h5>
	<i><?php echo $title;?></i>
	<?php $orig['show_bname'] = false;?>
	<blockquote><hr/><?php $this->load->view('feed/item',$orig);?></blockquote>
	<?php else:?>
	<h5>Share from unknown blog</h5>
	<blockquote><em>This content has been kidnaped by aliens!</em></blockquote>
	<?php endif;?>
<?php endif;?>

<hr style = "margin:2px 0;"/>
<div class = "row" style=" height: 18px; ">
<span class = "span5 offset1 tags">

<?php if (count($tags)>0):?><i class = "icon-tags"></i> Tags:
	<?php foreach ($tags as $tag):?>
		<span class = "label label-info">
			<a href = "/MyMicroBlog/index.php/search/?q=<?php echo $tag['text']?>" style = "color:white;"><?php echo $tag['text']?></a>
		</span>
	<?php endforeach;?>
<?php endif;?>
</span>
<small class = "span6">
	Posted by <a href = "/MyMicroBlog/index.php/user/info/<?php echo $author['uid']?>"><?php echo $author['uname']?></a> 
		<?php if ($show_bname):?>@
		<a href ='/MyMicroBlog/index.php/blog/index/<?php echo $bid?>'>
			<?php echo $blog_name?><?php endif;?></a>
		<?php echo $this->datelib->format_date($posttime);?>
</small>
</div>